package com.bd.scm.module.role.controller;


import com.bd.scm.module.role.service.BdRoleMainService;
import com.bd.utils.vo.Result;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Mason
 * @since 2021-01-11
 */
@RestController
@RequestMapping("/api/bdRoleMain")
public class BdRoleMainController {
    @Autowired
    private BdRoleMainService bdRoleMainService;

    @GetMapping("tree")
    @ApiOperation(value = "获取角色权限组树结构数据", httpMethod = "GET", protocols = "HTTP", notes = "获取角色权限组树结构数据（只有key、title" +
            "、children）", produces = "application/json")
    public Result getDeptTree(){

        return Result.ok(bdRoleMainService.getRoleMainTreeAll());
    }




}

